//============================================================================
// Name        : varsFromFile.cpp
// Author      : alex2stf
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include "stn/FileUtils.h"
#include "stn/WebUtils.h"
using namespace std;

int main(int argc, char* argv[]) {
//	 for(int i = 1; i < argc; i++) {
//		 cout << argv[i] << endl;
//	 }

	cout << "scanning file" << argv[1] << endl;


	 char *path=argv[1];

	// stn_getVarsFromFile(path);

	 ObjectsFromFile *objects=new ObjectsFromFile(path);
	 cout << objects->getPropertyByName("nume") << endl;

	 delete objects;
	//FileResult result=stn_readFile(path);
	//cout << result.getContent("\n");

//	FileResult webres=stn_readWebpage("http://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html");
	 FileResult webres=stn_readWebpage("http://localhost/TestRTC/index.php");
	cout << webres.getContent("\n");


FileResult outRes=stn_getStdOutFromCommand("ls -all");
outRes.printLines();

	//result.printLines();

	return 0;
}
